<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>shark::DataDistribution&lt; InputType &gt; Class Template Reference</title>
<script type="text/javaScript" src="search/search.js"></script>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3.0.1/es5/tex-mml-chtml.js"></script>
<script src="../../mlstyle.js"></script>
<link href="../css/besser.css" rel="stylesheet" type="text/css"/>
</head>
<!-- pretty cool: each body gets an id tag which is the basename of the web page  -->
<!--              and allows for page-specific CSS. this is client-side scripted, -->
<!--              so the id will not yet show up in the served source code -->
<script type="text/javascript">
    jQuery(document).ready(function () {
        var url = jQuery(location).attr('href');
        var pname = url.substr(url.lastIndexOf("/")+1, url.lastIndexOf(".")-url.lastIndexOf("/")-1);
        jQuery('#this_url').html('<strong>' + pname + '</strong>');
        jQuery('body').attr('id', pname);
    });
</script>
<body>
    <div id="shark_old">
        <div id="wrap">
            <div id="header">
                <div id="site-name"><a href="../../sphinx_pages/build/html/index.html">Shark machine learning library</a></div>
                <ul id="nav">
                    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/installation.html">Installation</a>
                    </li>
		    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/tutorials/tutorials.html">Tutorials</a>
                    </li>
		    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/benchmark.html">Benchmarks</a>
                    </li>
                    <li class="active">
                        <a href="classes.html">Documentation</a>
                        <ul>
                            <li class="first"></li>
                            <li><a href="../../sphinx_pages/build/html/rest_sources/quickref/quickref.html">Quick references</a></li>
                            <li><a href="classes.html">Class list</a></li>
                            <li class="last"><a href="group__shark__globals.html">Global functions</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
        </div>
    </div>
<div id="doxywrapper">
<!--
    <div id="global_doxytitle">Doxygen<br>Documentation:</div>
-->
    <div id="navrow_wrapper">
<!-- Generated by Doxygen 1.9.8 -->
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceshark.html">shark</a></li><li class="navelem"><a class="el" href="classshark_1_1_data_distribution.html">DataDistribution</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="classshark_1_1_data_distribution-members.html">List of all members</a> &#124;
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle"><div class="title">shark::DataDistribution&lt; InputType &gt; Class Template Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div></div>
</div><!--header-->
<div class="contents">

<p>A <a class="el" href="classshark_1_1_data_distribution.html" title="A DataDistribution defines an unsupervised learning problem.">DataDistribution</a> defines an unsupervised learning problem.  
 <a href="classshark_1_1_data_distribution.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_data_distribution_8h_source.html">shark/Data/DataDistribution.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:aa3f074650834a6551e8891eabedb396d" id="r_aa3f074650834a6551e8891eabedb396d"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_data_distribution.html#aa3f074650834a6551e8891eabedb396d">~DataDistribution</a> ()</td></tr>
<tr class="memdesc:aa3f074650834a6551e8891eabedb396d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Virtual destructor.  <br /></td></tr>
<tr class="separator:aa3f074650834a6551e8891eabedb396d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3358c43ba05299220ff8df6d5ea7bc75" id="r_a3358c43ba05299220ff8df6d5ea7bc75"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_data_distribution.html#a3358c43ba05299220ff8df6d5ea7bc75">draw</a> (<a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a> &amp;input) const =0</td></tr>
<tr class="memdesc:a3358c43ba05299220ff8df6d5ea7bc75"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generates a single pair of input and label.  <br /></td></tr>
<tr class="separator:a3358c43ba05299220ff8df6d5ea7bc75"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a81288ff28bf77b08bfa7ae6e7dbb1c5d" id="r_a81288ff28bf77b08bfa7ae6e7dbb1c5d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_data_distribution.html#a81288ff28bf77b08bfa7ae6e7dbb1c5d">operator()</a> ()</td></tr>
<tr class="separator:a81288ff28bf77b08bfa7ae6e7dbb1c5d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a457baebeeff07baba0785aec80e7d188" id="r_a457baebeeff07baba0785aec80e7d188"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classshark_1_1_unlabeled_data.html">UnlabeledData</a>&lt; <a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_data_distribution.html#a457baebeeff07baba0785aec80e7d188">generateDataset</a> (std::size_t size, std::size_t maximumBatchSize) const</td></tr>
<tr class="memdesc:a457baebeeff07baba0785aec80e7d188"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generates a data set with samples from from the distribution.  <br /></td></tr>
<tr class="separator:a457baebeeff07baba0785aec80e7d188"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaaf36928f34de97b789be2dbd26947f9" id="r_aaaf36928f34de97b789be2dbd26947f9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classshark_1_1_unlabeled_data.html">UnlabeledData</a>&lt; <a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_data_distribution.html#aaaf36928f34de97b789be2dbd26947f9">generateDataset</a> (std::size_t size) const</td></tr>
<tr class="memdesc:aaaf36928f34de97b789be2dbd26947f9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generates a data set with samples from from the distribution.  <br /></td></tr>
<tr class="separator:aaaf36928f34de97b789be2dbd26947f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><div class="compoundTemplParams">template&lt;class <a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a>&gt;<br />
class shark::DataDistribution&lt; InputType &gt;</div><p>A <a class="el" href="classshark_1_1_data_distribution.html" title="A DataDistribution defines an unsupervised learning problem.">DataDistribution</a> defines an unsupervised learning problem. </p>
<dl class="section user"><dt></dt><dd>The unsupervised learning problem is defined by an explicit distribution (in contrast to a finite dataset). The only method we need is to draw a sample from the distribution. </dd></dl>

<p class="definition">Definition at line <a class="el" href="_data_distribution_8h_source.html#l00057">57</a> of file <a class="el" href="_data_distribution_8h_source.html">DataDistribution.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="aa3f074650834a6551e8891eabedb396d" name="aa3f074650834a6551e8891eabedb396d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa3f074650834a6551e8891eabedb396d">&#9670;&#160;</a></span>~DataDistribution()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a> &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classshark_1_1_data_distribution.html">shark::DataDistribution</a>&lt; <a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a> &gt;::~<a class="el" href="classshark_1_1_data_distribution.html">DataDistribution</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Virtual destructor. </p>

<p class="definition">Definition at line <a class="el" href="_data_distribution_8h_source.html#l00061">61</a> of file <a class="el" href="_data_distribution_8h_source.html">DataDistribution.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a3358c43ba05299220ff8df6d5ea7bc75" name="a3358c43ba05299220ff8df6d5ea7bc75"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3358c43ba05299220ff8df6d5ea7bc75">&#9670;&#160;</a></span>draw()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a> &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void <a class="el" href="classshark_1_1_data_distribution.html">shark::DataDistribution</a>&lt; <a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a> &gt;::draw </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a> &amp;&#160;</td>
          <td class="paramname"><em>input</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Generates a single pair of input and label. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">input</td><td>the generated input </td></tr>
  </table>
  </dd>
</dl>

<p>Implemented in <a class="el" href="classshark_1_1_normal_distributed_points.html#acdcede1ac2229cb820348c9542ee1b0e">shark::NormalDistributedPoints</a>, and <a class="el" href="classshark_1_1_image_patches.html#a01400c960d4da83f22837902c459d35e">shark::ImagePatches</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_data_distribution.html#a457baebeeff07baba0785aec80e7d188">shark::DataDistribution&lt; InputType &gt;::generateDataset()</a>, and <a class="el" href="classshark_1_1_data_distribution.html#a81288ff28bf77b08bfa7ae6e7dbb1c5d">shark::DataDistribution&lt; InputType &gt;::operator()()</a>.</p>

</div>
</div>
<a id="aaaf36928f34de97b789be2dbd26947f9" name="aaaf36928f34de97b789be2dbd26947f9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaaf36928f34de97b789be2dbd26947f9">&#9670;&#160;</a></span>generateDataset() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a> &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classshark_1_1_unlabeled_data.html">UnlabeledData</a>&lt; <a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a> &gt; <a class="el" href="classshark_1_1_data_distribution.html">shark::DataDistribution</a>&lt; <a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a> &gt;::generateDataset </td>
          <td>(</td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>size</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Generates a data set with samples from from the distribution. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">size</td><td>the number of samples in the dataset </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="_data_distribution_8h_source.html#l00093">93</a> of file <a class="el" href="_data_distribution_8h_source.html">DataDistribution.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_data_distribution.html#a457baebeeff07baba0785aec80e7d188">shark::DataDistribution&lt; InputType &gt;::generateDataset()</a>.</p>

</div>
</div>
<a id="a457baebeeff07baba0785aec80e7d188" name="a457baebeeff07baba0785aec80e7d188"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a457baebeeff07baba0785aec80e7d188">&#9670;&#160;</a></span>generateDataset() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a> &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classshark_1_1_unlabeled_data.html">UnlabeledData</a>&lt; <a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a> &gt; <a class="el" href="classshark_1_1_data_distribution.html">shark::DataDistribution</a>&lt; <a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a> &gt;::generateDataset </td>
          <td>(</td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>maximumBatchSize</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Generates a data set with samples from from the distribution. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">size</td><td>the number of samples in the dataset </td></tr>
    <tr><td class="paramname">maximumBatchSize</td><td>the maximum size of a batch </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="_data_distribution_8h_source.html#l00079">79</a> of file <a class="el" href="_data_distribution_8h_source.html">DataDistribution.h</a>.</p>

<p class="reference">References <a class="el" href="group__shark__globals.html#ga28f4e36576738062f68ba0ca3e0033be">shark::createUnlabeledDataFromRange()</a>, and <a class="el" href="classshark_1_1_data_distribution.html#a3358c43ba05299220ff8df6d5ea7bc75">shark::DataDistribution&lt; InputType &gt;::draw()</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_data_distribution.html#aaaf36928f34de97b789be2dbd26947f9">shark::DataDistribution&lt; InputType &gt;::generateDataset()</a>.</p>

</div>
</div>
<a id="a81288ff28bf77b08bfa7ae6e7dbb1c5d" name="a81288ff28bf77b08bfa7ae6e7dbb1c5d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a81288ff28bf77b08bfa7ae6e7dbb1c5d">&#9670;&#160;</a></span>operator()()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a> &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a> <a class="el" href="classshark_1_1_data_distribution.html">shark::DataDistribution</a>&lt; <a class="el" href="_multi_task_svm_8cpp.html#a0dea9a3a85d327080d9b617903508925">InputType</a> &gt;::operator() </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_data_distribution_8h_source.html#l00069">69</a> of file <a class="el" href="_data_distribution_8h_source.html">DataDistribution.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_data_distribution.html#a3358c43ba05299220ff8df6d5ea7bc75">shark::DataDistribution&lt; InputType &gt;::draw()</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>include/shark/Data/<a class="el" href="_data_distribution_8h_source.html">DataDistribution.h</a></li>
</ul>
</div><!-- contents -->
</div>
</body>
</html>
